package com.magic.smartcity.view.more.hospital

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.navigation.Navigation
import com.magic.smartcity.R
import com.magic.smartcity.beans.HospitalPatientReserve
import com.magic.smartcity.databinding.FragmentHospitalReservationDetailBinding

class HospitalReservationDetailFragment : Fragment() {
    private lateinit var binding:FragmentHospitalReservationDetailBinding
    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        binding = FragmentHospitalReservationDetailBinding.inflate(layoutInflater)
        initView()
        return binding.root
    }

    private fun initView() {
        val patientReserve = arguments?.getSerializable("reservationDetail") as HospitalPatientReserve
        binding.reserveDetail = patientReserve

        binding.btnOk.setOnClickListener{
            Navigation.findNavController(binding.root).popBackStack(R.id.hospitalDetailFragment,true)
        }
    }

}